package com.coldchain.common.feign;


import com.coldchain.common.msg.ObjectRestResponse;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.math.BigDecimal;
import java.util.Map;

/**
 * @ClassName CompanyFeign
 * @Description TODO
 * @Author fangliai
 * @Date 2018/9/22 17:02
 * @Vesion 1
**/
@FeignClient(value = "ch-admin",configuration = {})
public interface CompanyFeign {

    /**
     * 获取企业祥情
     * @param id
     * @return
     */
    @RequestMapping("/company/info/{id}")
    public ObjectRestResponse<Map<String,Object>> getCompanyInfo(@PathVariable("id") String id);


    /**
     * 企业信用支付
     * @param ornderNo
     * @param amount
     * @return
     */
    @RequestMapping("/company/payOrder")
    public ObjectRestResponse<String> useAmountPayOrder(
            @RequestParam("companyId") String companyId,
            @RequestParam("ornderNo") String ornderNo,
            @RequestParam("amount") BigDecimal amount);
}
